﻿
@{
    ViewBag.Title = "HiddenTroubleAdd";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css {
    <link href="~/Assets/css/lib/bootstrap-select.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/fileinput.css" rel="stylesheet" />
    <link href="~/Assets/js/jqueryui.css" rel="stylesheet" />
    <style>
        th {
            text-align: center;
            font-weight: bold;
        }

        td {
            text-align: center;
            vertical-align: middle;
        }
    </style>
}
<div class="page-content" ng-cloak ng-controller="HiddenTroubleController" ng-init="
     SolutionId='@(Request.QueryString["SolutionId"].IsEmpty() ? "0" : Request.QueryString["SolutionId"])';
     page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
     pagename='@(Request.QueryString["pagename"].IsEmpty() ? "HiddenTroubleRectification" : Request.QueryString["pagename"])';
     GetSolutionEditDetail(SolutionId,'RectificationAdd');
     AddModel.IsComplete=true;
     AddModel.OperateTime = '@DateTime.Now.ToString("yyyy-MM-dd")';
     InitRectifationPage();
     ">
    <div class="load" ng-show="DataLoading">
        <div class="loader">
            <svg version="1.1" id="loader-1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
            <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />



			</path>
		</svg>
            <div class="load-msg" ng-bind="LoadingMsg"></div>
        </div>
    </div>
    <div class="page-heading">
        <h1>添加整改记录</h1>
        <div class="options">
            <div class="btn-toolbar">

            </div>
        </div>
    </div>
    <ol class="breadcrumb">
        <li><a>主页</a></li>
        <li><a>问题治理</a></li>
        <li><a>问题整改</a></li>
        <li class="active"><a>添加整改记录</a></li>
    </ol>
    <form id="HiddenTroubleForm" class="form-horizontal row-border">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <div id="basicinfo" class="panel panel-default">
                        <div class="panel-heading"><h2>解决措施基本信息</h2></div>
                        <div class="panel-body">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">计划完成时间：</label>
                                <div class="col-sm-2">
                                    <input id="PlanCompleteTime" class="form-control" ng-model="SolutionEditModel.PlanCompleteTime" disabled />
                                </div>
                                <label class="col-sm-1 control-label">设施设备：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="SolutionEditModel.EquTypeAndDep" disabled />
                                </div>
                                <label class="col-sm-1 control-label">联系部门/联系人：</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" value="{{SolutionEditModel.DepartmentName}}-{{SolutionEditModel.Responsible}}" disabled />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">整改措施：</label>
                                <div class="col-sm-8">
                                    <textarea class="form-control autosize" ng-model="SolutionEditModel.SolutionContent" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 50px;" disabled></textarea>
                                </div>
                            </div>
                            @*<div class="form-group">
                                <label class="col-sm-1 control-label">整改进度：</label>
                                <div class="col-sm-5">
                                    <div class="progress progress-striped" style="margin-top:15px;">
                                        <div class="progress-bar progress-bar-info" ng-style="{'width':SolutionEditModel.Process +'%'}"></div>
                                    </div>
                                </div>
                                <label class="col-sm-1 control-label" style="text-align:left;font-weight:bold;">{{SolutionEditModel.Process}}%</label>
                            </div>*@
                            <div class="form-group">
                                <label class="col-sm-1 control-label">文件列表：</label>
                                <div class="col-sm-8">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th style="width:5%">序号</th>
                                                <th style="width:30%">文件名称</th>
                                                <th style="width:10%">文件大小(kb)</th>
                                                <th style="width:10%">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr ng-show="SolutionEditModel.FileList.length==0">
                                                <td colspan="4" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                            </tr>
                                            <tr ng-repeat="x in SolutionEditModel.FileList">
                                                <td ng-bind="$index+1"></td>
                                                <td ng-bind="x.FileName"></td>
                                                <td ng-bind="x.FileSize"></td>
                                                <td>
                                                    <a href="../Download/DownloadFile?FileId={{x.FileId}}" class="btn btn-success btn-xs btn-label"><i class="fa fa-download"></i>下载</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-sky">
                        <div class="panel-heading"><h2>添加整改记录</h2></div>
                        <div class="panel-body">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">整改时间：</label>
                                <div class="col-sm-2">
                                    <datepicker id="OperateTime" option="datetimeOption" format="L" ng-model="AddModel.OperateTime"></datepicker>
                                </div>
                                @*<label class="col-sm-1 control-label">整改进度：</label>
                                <div class="col-sm-5">
                                    <div class="col-md-9">
                                        <div id="slider-range-min" class="slider success"></div>
                                        <div class="slider-value">
                                            <span class="slider-value" id="slider-range-min-amount"></span>
                                        </div>
                                    </div>
                                </div>*@
                                @*<label class="col-sm-1 control-label">完成整改：</label>
        <div class="col-sm-2">
            <select class="form-control" ng-model="AddModel.IsComplete" ng-change="ChangeProcess(AddModel.IsComplete,SolutionEditModel);">
                <option value="false" selected ng-selected="AddModel.Process<100">否</option>
                <option value="true" ng-selected="AddModel.Process==100">是</option>
            </select>
        </div>*@
                            </div>

                            <div class="form-group">
                                <label class="col-sm-1 control-label">整改情况：</label>
                                <div class="col-sm-8">
                                    <textarea class="form-control autosize" ng-model="AddModel.Description" style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 50px;"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">上传文件:</label>
                                <div class="col-lg-8">
                                    <input type="file" class="form-control" style="border:none;" id="ImageFile" multiple>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <div class="col-sm-6 col-sm-offset-2">
                            <button class="btn-primary btn" ng-click="AddRectificationRecord(SolutionId,AddModel,pagename,page);">整改完成</button>
                            <a href="{{pagename}}?page={{page}}" class="btn-default btn">返回</a>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </form>
</div>


@section Js{
    <script src="~/Assets/js/pg/HiddenTrouble.js"></script>
    <script src="~/Assets/js/libs/moment.min.js"></script>
    <script src="~/Assets/js/libs/locales/date/zh-cn.js"></script>
    <script src="~/Assets/js/libs/bootstrap-datetimepicker.min.js"></script>
    <script src="~/Assets/js/libs/angularjs-datepicker.js"></script>
    <script src="~/Assets/js/libs/fileinput.js"></script>
    <script src="~/Assets/js/libs/zh.js"></script>
    <script>
        $('#docfiles').fileinput({
            language: 'zh'
        });
        
    </script>
}